<div class="col-sm-12 mt20">
	<div class="panel panel-default">
		<div class="panel-body">
			<div class="col-sm-12">
				<div class="row">
					<div class="col-sm-2">
						<input type="text" class="form-control" placeholder="产品名称" ng-model="searchform.name" ng-keyup="myKeyup($event)">
					</div>
					<div class="col-sm-2">
						<input type="text" class="form-control" placeholder="产品编号" ng-model="searchform.code" ng-keyup="myKeyup($event)">
					</div>
					<div class="col-sm-3">
						<ui-select ng-model="searchform.place_code" theme="bootstrap" ng-keyup="myKeyup($event)">
							<ui-select-match placeholder="请选择一个场所">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="item.code as item in viewarr | filter: $select.search">
								<span ng-bind-html="item.name | highlight: $select.search"></span>
								<span ng-show="item.code">({{item.code}})</span>
							</ui-select-choices>
						</ui-select>
					</div>
					<div class="col-sm-2 ">
						<ui-select ng-model="searchform.sale_category" theme="bootstrap" ng-keyup="myKeyup($event)">
							<ui-select-match placeholder="产品分类">
								{{$select.selected.label}}
							</ui-select-match>
							<ui-select-choices repeat="item.value as item in dictbytypelist | filter: $select.search">
								<span ng-bind-html="item.label | highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
					</div>
					<div class="col-sm-2 pull-right">
						<button type="submit" class="btn btn-info search  btn-block" ng-click="load()">立即搜索</button>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="panel panel-default">
		<div class="panel-body">
			<table class="table table-condensed table-hover table-bordered">
				<thead>
					<tr>
						<th style="min-width: 200px;">基本信息</th>
						<th style="width: 135px;">价格</th>
						<th class="text-center" style="width: 111px;">有效期</th>
						<th style="width: 90px;">产品状态</th>
						<!-- <th >售卖渠道
							<a class="btn btn-link under-line" style="padding: 0px 5px; vertical-align: baseline;" ng-click="myChannel()">默认渠道</a>
						</th>
						<th style="width: 103px;">公开销售</th> -->
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="obj in objs">
						<td>
							产品名称：{{obj.name_inside}}
							<br> 产品编号：{{obj.code}}
							<br> 产品分类：{{obj.sale_category_name}}
							<br> <strong>供应商名：{{obj.create_company_name}}</strong>
						</td>
						<td>
							分销价：<span><strong style="color: red;">{{obj.cost_price}}</strong></span> 元
							<br /> 指导价：<span><strong style="color: red;">{{obj.guide_price}}</strong></span> 元
							<br />市场价：<span>{{obj.market_price}}</span> 元
						</td>
						<td class="text-center">
							{{obj.periodstart}}
							<br />至
							<br />{{obj.periodend}}
						</td>
						<td>
							<span ng-show="obj.sale_apply_state_name == ''">
								<br/>
							</span> {{obj.state_name}}
							<br/>
							<span ng-show="obj.sale_apply_state_name != ''" ng-bind="obj.sale_apply_state_name"></span>
						</td>
						<!-- <td>
							<div ng-if="obj.sale_apply_state != 'new'">
								<span ng-bind-html="obj.channel_list_name"></span><br ng-show="obj.channel_list_name"/>
							</div>
						</td>
						<td>
							<div ng-if="obj.sale_apply_state != 'new'">
								<label class="i-switch bg-success" style="margin-left: 15px;">
									<input type="checkbox" ng-disabled="true" ng-model="obj.is_selected3" ng-change="change2(obj, obj.is_selected3, $index)">
									<i></i>
								</label>
								<br>
							</div>
						</td> -->
						<td class="text-center">
							<!--<a ng-show="obj.state=='1'" ng-click="stop(obj.id)" class="btn btn-primary btn-xs">下架</a>
							<a ng-show="(obj.state=='0' || obj.state=='2') && obj.sale_apply_state != 'apply_sale'" ng-click="start(obj.id)" class="btn btn-danger btn-xs">申请上架</a>
							<a ng-click="edit(obj.id)" ng-show="(obj.state=='0' || obj.state == '2') && obj.sale_apply_state != 'apply_sale'" class="btn btn-success btn-xs">编辑</a>
							<a ng-click="del(obj.id)" ng-show="(obj.state=='0' || obj.state == '2') && obj.sale_apply_state != 'apply_sale'" class="btn btn-danger btn-xs">删除</a>
							<a ng-show="obj.used_state=='1'" ng-click="usedstart(obj.id)" class="btn btn-primary btn-xs">允许消票</a>
							<a ng-show="obj.used_state=='0'" ng-click="usedstop(obj.id)" class="btn btn-danger btn-xs">禁止消票</a>-->
							<a ng-click="info(obj.id)" ng-show="obj.state == '1' || obj.sale_apply_state == 'apply_sale'" class="btn btn-warning btn-xs">详情</a>
							<!--<a ng-click="distribution(obj.code, obj.sale_target_type)" class="btn btn-default btn-xs" ng-show="obj.sale_target_type == 1">分配经销商</a>
							<a ng-click="distribution(obj.code, obj.sale_target_type)" class="btn btn-default btn-xs" ng-show="obj.sale_target_type == 0">分配不允许销售经销商</a>
							<a ng-click="skset(obj.code,obj.name,obj.guide_price, obj.cost_price)" class="btn btn-default btn-xs" ng-show="obj.sale_category_name == '正价票-商客' && obj.state == 1">商客专用设置</a>-->

						</td>
					</tr>
				</tbody>
			</table>


			<div class="text-right">

				<pagination total-items="bigTotalItems" ng-model="bigCurrentPage" ng-change="load()" previous-text="上一页" next-text="下一页"
                    first-text="首页" last-text="尾页" max-size="maxSize" boundary-links="true" rotate="false" items-per-page="itemsPerPage"
                    class="m-t-none m-b">
                </pagination>

			</div>
		</div>
	</div>


</div>